package com.campsys.mapping;

import com.campsys.domain.TCourse;
import com.campsys.domain.param.CourseAddParam;
import com.campsys.domain.param.CourseUpdateParam;
import com.campsys.domain.vo.CourseListVo;
import com.campsys.domain.vo.CoursePageVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface CourseMapping {

    CourseMapping INSTANCE = Mappers.getMapper(CourseMapping.class);

    TCourse to(CourseAddParam courseAddParam);

    TCourse to(CourseUpdateParam courseUpdateParam);

    List<CoursePageVo> toPage(List<TCourse> list);

    List<CourseListVo> toList(List<TCourse> list);
}
